﻿using iTextSharp.text;
using iTextSharp.text.pdf;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ItextSharpDemo
{
    public class SamplePdf : IPdfCreator
    {
        public void Create(string fileName)
        {
            var doc1 = new Document();
            FileStream stream = new FileStream(fileName, FileMode.Create);
            PdfWriter.GetInstance(doc1, stream);

            doc1.Open();
            doc1.Add(new Paragraph("My First PDF"));
            doc1.Close();
        }
    }
}
